@()(implicit request: RequestHeader)
@admin.main("用户管理")("userManage") {
	<div class="page-content">

		<div class="page-bar">
			<ul class="page-breadcrumb">
				<li>
					<i class="fa fa fa-table"></i>
					<span>用户管理</span>
				</li>
			</ul>
		</div>


		<div class="row-fluid">
			<div class="row">
				<div class="col-md-12 col-sm-12">
					<div class="portlet blue-madison box">
						<div class="portlet-title">
							<div class="caption">
								用户管理
							</div>
						</div>

						<div class="portlet-body">
							<div class="table-responsive">

								<div id="toolbar">
									<button type="button" class="btn btn-primary" id="deleteButton" onclick="UserManage.addShow">
										<i class="fa fa-plus"></i>&nbsp;新增用户
									</button>
								</div>

								<table class="display table table-bordered" id="table" data-pagination="true" data-search="true"
								data-toolbar="#toolbar" data-page-list="[10, 25, 50, 100, all]" data-multiple-search="true">
									<thead>
										<tr>
											<th data-field="name" data-sortable="true">用户名</th>
											<th data-field="createTime" data-sortable="true">创建时间</th>
											<th data-field="operate" data-formatter="UserManage.operateFmt">操作</th>
										</tr>
									</thead>
								</table>

								<div id="addModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
									<div class="modal-dialog" style="width: 800px">
										<div class="modal-content">
											<div class="modal-header bg-primary">
												<button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
												<h4 class="modal-title">
													<i class="fa fa-plus"></i>
													<span id="lblAddTitle" style="font-weight: bold">新增用户</span>
												</h4>
											</div>
											<form class="form-horizontal" id="form" action="" data-toggle="validator" enctype="multipart/form-data">
												<div class="modal-body">
													<div class="row-fluid">

														<div class="form-group">
															<label class="control-label col-sm-3">用户名:</label>
															<div class="col-sm-6">
																<input class="form-control" name="name"/>
															</div>
														</div>

														<div class="form-group">
															<label class="control-label col-sm-3">密码:</label>
															<div class="col-sm-6">
																<input class="form-control" name="password" />
															</div>
														</div>

													</div>
												</div>
												<div class="modal-footer bg-info">
													<input type="hidden" id="ID" name="ID" />
													<button type="button" class="btn blue" onclick="UserManage.add">确定</button>
													<button type="button" class="btn green" data-dismiss="modal">取消</button>
												</div>
											</form>
										</div>
									</div>
								</div>

								<div id="updateModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
									<div class="modal-dialog" style="width: 650px">
										<div class="modal-content">
											<div class="modal-header bg-primary">
												<button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
												<h4 class="modal-title">
													<i class="fa fa-repeat"></i>
													<span id="lblAddTitle" style="font-weight: bold">重置</span>
												</h4>
											</div>
											<form class="form-horizontal" id="updateForm" action="" data-toggle="validator">
												<div class="modal-body">
													<div class="row-fluid">

														<div class="form-group">
															<label class="control-label col-sm-3">用户名:</label>
															<div class="col-sm-6">
																<input class="form-control fillByName" name="name" readonly/>
															</div>
														</div>


														<div class="form-group">
															<label class="control-label col-sm-3">密码:</label>
															<div class="col-sm-6">
																<input class="form-control" name="password" />
															</div>
														</div>

													</div>
												</div>
												<div class="modal-footer bg-info">
													<input type="hidden" id="id" name="id" />
													<button type="button" class="btn blue" onclick="UserManage.update">
														确定</button>
													<button type="button" class="btn green" data-dismiss="modal">
														取消</button>
												</div>
											</form>
										</div>
									</div>
								</div>


							</div>
						</div>
					</div>
				</div>
			</div>


		</div>

	</div>


	<script>
			$(function () {
				UserManage.init

			})


	</script>


}